
import request from '@/plugin/axios'


// 获取职责模块树列表
export function getRespModuleTree(params) {
    return request({
        url: '/upms/respmodule/tree/' + params,
        method: 'get',
        params: request.adornParams({})
    })
}

// 获取职责关联的菜单模块树节点
export function getRespSelectedModule(pkResponsibility) {
    return request({
        url: '/upms/respmodule/selected/' + pkResponsibility,
        method: 'get',
        params: request.adornParams({})
    })
}

// 获取职责未关联的菜单模块树节点
export function getRespUnSelectedModule(pkResponsibility) {
    return request({
        url: '/upms/respmodule/unselected/' + pkResponsibility,
        method: 'get',
        params: request.adornParams({})
    })
}

// 获取列表
export function getrespmodulelist (params) {
  return request({
    url: '/upms/respmodule/list',
    method: 'get',
    params: request.adornParams(params)
  })
}

// 获取信息
export function getrespmoduleinfo (id) {
  return request({
    url: '/upms/respmodule/info/' + id,
    method: 'get',
    params: request.adornParams({})
  })
}

// 添加
export function addrespmodule (data) {
  return request({
    url: '/upms/respmodule/save',
    method: 'post',
    data
  })
}

// 修改
export function updaterespmodule (data) {
  return request({
    url: '/upms/respmodule/update',
    method: 'put',
    data
  })
}

// 批量删除
export function delBatchrespmodule (params) {
  return request({
    url: '/upms/respmodule/delete',
    method: 'post',
    data: request.adornData(params, false)
  })
}

// 删除
export function delrespmodule(id) {
  return request({
    url: '/upms/respmodule/delete/' + id,
    method: 'delete',
  })
}